<% form_tag clear_closed_tickets_path do -%>
<div id="clear_conditions">
Type:<%= select_tag("ticket_template_id", options_for_select(@ticket_templates.collect {|p| [ p.name, p.id.to_s ] }) )%> <%= add_clear_field_link "Add new condition" %>
<%= submit_tag "clear", :confirm => "Are you sure?"%>
<div class="clear_condition">
<select id='conditions__field' name='conditions[][field]'> 
<%= options_for_select([["Created at", "created_at"], ["Deadline", "deadline"], ["Closed at", "updated at"]], "created_at")%>
</select>
<%=h '<' %>
<%= calendar_date_select_tag('conditions[][date]', Date.today-6.month, :id => 'conditions__date')%>
</div>
</div>
<% end -%>
